<template>
    
</template>
<script>
export default {
    name: 'c_layer_ArcGisMap',
    data() {
        return {
            viewer:null
        }
    },
    mounted () {
        let t=this
        this.$nextTick(()=>{
            t.viewer=t.$parent.viewer
            t.Cesium=t.$parent.Cesium
            t.load()
        })
    },
    methods:{
        load() {
            let t=this
            let {Cesium,viewer} =this
            viewer.imageryLayers.addImageryProvider(
                // new Cesium.ArcGisMapServerImageryProvider({
                //     url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer',
                //     enablePickFeatures: true,
                //     show:true
                // })
                new Cesium.WebMapTileServiceImageryProvider({
                    url:'http://t0.tianditu.com/img_w/wmts?',
                    layer:'img',
                    style:'default',
                    format:'tiles',
                    tileMatrixSetID:'w',
                    credit:new Cesium.Credit('天地图全球影像服务'),
                    maximumLevel:18
                })
            )
        }
    }

}
</script>